package com.baidu.mpks.usergroup.enums;

import com.fasterxml.jackson.annotation.JsonValue;

import java.util.Arrays;
import java.util.List;

public enum ResourceType {

    TAG("TAG");

    @JsonValue
    private String name;

    private ResourceType(String name) {
        this.name = name;
    }

    public static ResourceType getResourcesType(String name) {
        ResourceType[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            ResourceType resourceType = var1[var3];
            if (resourceType.getName().equals(name)) {
                return resourceType;
            }
        }

        return TAG;
    }

    public static List<ResourceType> getResourceTypeList() {
        return Arrays.asList(values());
    }

    public String getName() {
        return this.name;
    }
}
